package com.example.demo.entity.es;

import java.util.Date;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author 88377761
 *
 */
@Document(indexName = "msg", type = "docs", shards = 1, replicas = 0)
public class Msg {

	@Id
	private Long id;

	@Field(type = FieldType.Text, analyzer = "ik_max_word")
	private String test; // 内容

	@Field(type = FieldType.Keyword)
	private String sender;// 发送人

	@Field(type = FieldType.Keyword)
	private String receiver; // 接收人

	@Field(type = FieldType.Date, format = DateFormat.none)
	private Date sendTime; // 发送时间
}
